package board.checkboard.dao;

import java.sql.SQLException;
import java.util.List;

import util.SqlMapLocator;
import board.checkboard.dto.BoardDto;

public class BoardDao {
	private static BoardDao instance = new BoardDao();

	public static BoardDao getInstance() { 
		return instance; 
	}

	private BoardDao() {

	}
	
	public List<BoardDto> list(int board_no) throws SQLException {
		return (List<BoardDto>)SqlMapLocator.getMapper().queryForList("checkboard.selectAll", board_no);
	}
	public static void insertBoard(BoardDto paramClass) throws SQLException {
		SqlMapLocator.getMapper().insert("checkboard.insertBoard", paramClass);
	}
	public static void updateBoard(int Writer) throws SQLException {
		SqlMapLocator.getMapper().update("checkboard.selectMember",Writer);
	}

}